package com.coffee.admin.service.supplier.dao;

import com.coffee.admin.api.supplier.query.SupplierRoleRelationQuery;
import com.coffee.admin.service.supplier.bean.SupplierRoleRelation;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SupplierRoleRelationDao {
	public SupplierRoleRelation findById(Integer id);

	public SupplierRoleRelation findByIdForUpdate(Integer id);

	public List<SupplierRoleRelation> findByIds(@Param("idList") List<Integer> idList);

	public Integer count(@Param("param") SupplierRoleRelationQuery param);

	public List<SupplierRoleRelation> page(@Param("param") SupplierRoleRelationQuery param, @Param("offset") Integer offset, @Param("rows") Integer rows);

	public SupplierRoleRelation findFirst(@Param("param") SupplierRoleRelationQuery param);

	public Integer insert(SupplierRoleRelation param);

	Integer insertBatch(@Param("supplierId") Integer supplierId, @Param("roleIdList") List<Integer> roleIdList);

	public void updateById(@Param("param") SupplierRoleRelation param);

	public Integer deleteById(Integer id);

	public Integer deleteBySupplierIdId(Integer supplierId);

	public Integer deleteByIds(List<Integer> idList);

	public List<Integer> findRoleIdListBySupplierId(@Param("supplierId") Integer supplierId);

}